From: Konrad Rzeszutek Wilk Date: Wed, 20 Apr 2016 20:20:37 +0000 (-0400) Subject: xsplice: Print build_id in keyhandler and on bootup. X-Git-Tag: archive/raspbian/4.8.0-1+rpi1~1^2~1190 X-Git-Url: https://dgit.raspbian.org/%22http://www.example.com/cgi/%22/%22http:/www.example.com/cgi/%22?a=commitdiff_plain;h=b1ea652c7474febb734ba2ad8dfe12356e09fb7a;p=xen.git xsplice: Print build_id in keyhandler and on bootup. As it should be an useful debug mechanism. Signed-off-by: Konrad Rzeszutek Wilk Acked-by: Jan Beulich Reviewed-by: Andrew Cooper Release-acked-by: Wei Liu --- diff --git a/xen/common/xsplice.c b/xen/common/xsplice.c index b5df367e2f..696880eddd 100644 --- a/xen/common/xsplice.c +++ b/xen/common/xsplice.c @@ -16,6 +16,7 @@ #include #include #include +#include #include #include #include @@ -1352,10 +1353,15 @@ static const char *state2str(unsigned int state) static void xsplice_printall(unsigned char key) { struct payload *data; + const void *binary_id = NULL; + unsigned int len = 0; unsigned int i; printk("'%c' pressed - Dumping all xsplice patches\n", key); + if ( !xen_build_id(&binary_id, &len) ) + printk("build-id: %*phN\n", len, binary_id); + if ( !spin_trylock(&payload_lock) ) { printk("Lock held. Try again.\n"); @@ -1392,6 +1398,12 @@ static void xsplice_printall(unsigned char key) static int __init xsplice_init(void) { + const void *binary_id; + unsigned int len; + + if ( !xen_build_id(&binary_id, &len) ) + printk(XENLOG_INFO XSPLICE ": build-id: %*phN\n", len, binary_id); + register_keyhandler('x', xsplice_printall, "print xsplicing info", 1); arch_xsplice_init();